package com.pang.gulimall.coupon.test;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author pang-yun
 * Date:  2022-02-24 16:24
 * Description:
 */

@RestController
@RefreshScope  // 动态刷新
public class NacosTestController {

    @Value("${info.username}")
    private String username;

    @Value("${info.password}")
    private String password;

    @GetMapping("/user")
    public String getInfo() {
        return "coupon: " + username + " " + password;

    }
}
